-- GENERATED SPELL FOR [Lethlas] --


function spell0_5312(pUnit, Event) --@Corrosive Acid Breath,n/a--
pUnit:FullCastSpellOnTarget(20667,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5312', 30000, 1)
end

function spell1_5312(pUnit, Event) --@Wing Flap,Self--
pUnit:FullCastSpellOnTarget(12882,pUnit)
pUnit:RegisterEvent('Sorts_5312', 589, 1)
end

function Sorts_5312(pUnit, Event)
local choix_sorts_5312 = math.random(0, 1)
if choix_sorts_5312 == 0 then
pUnit:RegisterEvent('spell0_5312', 1, 1)
end
if choix_sorts_5312 == 1 then
pUnit:RegisterEvent('spell1_5312', 1, 1)
end
end

function mob5312_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5312', math.random(1500, 3000), 1)
end

function mob5312_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5312_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5312_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5312, 1, 'mob5312_Action')
RegisterUnitEvent(5312, 2, 'mob5312_Leave')
RegisterUnitEvent(5312, 3, 'mob5312_Kill')
RegisterUnitEvent(5312, 4, 'mob5312_Die')
